package NGUYENHOANG.OOP.BT2;

import java.util.Scanner;

public class TIENNET {

	public static void main(String[] args) {
		System.out.println("nhap vao thoi gian bat dau: ");
		Scanner sc = new Scanner(System.in);
		int bdau = sc.nextInt();
		System.out.println("nhap vao thoi gian ket thuc: ");
		int kthuc = sc.nextInt();
		int tongtg = kthuc - bdau;
		double tien = 0;
		
		if(tongtg > 6){
			if((bdau >=7) && (kthuc <= 17)){
				tien = tongtg*(200*60) - 0.1*(tongtg*(200*60));
			}
		}
			else if(tongtg > 4){
				if((bdau >=17) && (kthuc <= 24)){
					tien = tongtg*(200*60) - 0.1*(tongtg*(200*60));
			}
			}
				else if(tongtg > 5){
					if((bdau >= 24) && (kthuc <= 7)){
						tien = tongtg*(200*60) - 0.1*(tongtg*(200*60));
					}
				}
				System.out.println("Tien phai tra la: " +tien);
			}
}

	
